{% extends 'base.html' %}

{%block login%}
    {% if errors %}
        <li>
            {% for error in errors %}
             <p style="color: red;">
                Please correct the error: {{error}} below.
             </p>
              {% endfor %}
        </li>
    {% endif %}
<div id="loginModal" class="modal show">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close">x</button>
        <h1 class="text-center text-primary">登录</h1>
      </div>
      <div class="modal-body">
        <form action="" class="form col-md-12 center-block" method="post">{% csrf_token %}
          <div class="form-group">
            <input type="text" class="form-control input-lg" placeholder="用户名" name='username'>
          </div>
          <div class="form-group">
            <input type="password" class="form-control input-lg" placeholder="登录密码" name='password'>
          </div>
          <div class="form-group">
            <button class="btn btn-primary btn-lg btn-block">立刻登录</button>
            <span><a href="#">找回密码</a></span>
            <span><a href="#" class="pull-right">注册</a></span>
          </div>
        </form>
      </div>
      <div class="modal-footer">
      </div>
    </div>
  </div>
</div>
{%endblock%}
